﻿#region Using Statements
using Microsoft.Xna.Framework;
#endregion

namespace team1337blarg
{
    class MainMenuScreen : MenuScreen
    {
        #region Initialization

        public MainMenuScreen()
            : base("Main Menu")
        {
            // Create our menu entries
            MenuEntry playBensGame = new MenuEntry("Play Ben's Game!");
            MenuEntry playNicksGame = new MenuEntry("Play Nick's Game!");
            MenuEntry playPaulsGame = new MenuEntry("Play Paul's Game!");

            //Hook up menu event handlers.
            playBensGame.Selected += PlayBensGameSelected;
            playNicksGame.Selected += PlayNicksGameSelected;
            playPaulsGame.Selected += PlayPaulsGameSelected;

            //Add entries to the menu.
            MenuEntries.Add(playBensGame);
            MenuEntries.Add(playNicksGame);
            MenuEntries.Add(playPaulsGame);
        }

        #endregion

        #region Handle Input

        void PlayBensGameSelected(object sender, PlayerIndexEventArgs e)
        {
            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                               new BensGame());
        }

        void PlayNicksGameSelected(object sender, PlayerIndexEventArgs e)
        {
            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                               new NicksGame());
        }

        void PlayPaulsGameSelected(object sender, PlayerIndexEventArgs e)
        {
            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                               new PaulsGame());
        }

        #endregion

    }
}
